import {get, post, del, put} from "@/apis/http/request";
import {StorageConfig} from "@/apis/model/system/StorageConfigModel";

/**
* 得到列表
* @param params
*/
export const getStorageConfigList = (params: any) => get("/storageConfig/list", params)

/**
* 得到分页列表
* @param params
*/
export const storageConfigPage = (params: any) => post("/storageConfig/page", params)

/**
* 删除数据
* @param id
* @returns
*/
export const deleteStorageConfigById = (id: number) => del("/storageConfig/delete/"+ id)

/**
* 新增数据
* @param param
*/
export const insertStorageConfig = (param: StorageConfig) => post("/storageConfig", param)

/**
* 更新数据
* @param param
*/
export const updateStorageConfig = (param: StorageConfig) => put("/storageConfig", param)


export const updateSwitch = (param: StorageConfig) => post('/storageConfig/switchStatus',param)